package com.glodon.paas.account.security.openid.service;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URL;

/**
 * OpenId service discovery
 *
 * @author Don Li
 */
public class OpenIdDiscovery extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        URL url = new URL(req.getScheme(), req.getServerName(), req.getServerPort(), "/account/user.jsp");
    	resp.sendRedirect(url.toString());
    }
}
